<?php 
require "DataLoad.php"; 
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<html>
<head>
<title><?php echo $GuildName;?> - DKP系统</title>
<script language="JavaScript" src="inc/jquery.js"></script>

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="Generator" content="EditPlus">
<meta name="Author" content="SULei">
<meta name="Keywords" content="DKP WOW GUILD">
<meta name="Description" content="">
<link href="<?php echo $StylePath;?>/main.css" rel="stylesheet" type="text/css" />
<script language="JavaScript" src="<?php echo $StylePath;?>/styleplus.js"></script>
<style type="text/css" media="all">

</style>
</head>

<body>
<div class="header">
<?php require "menu.php"; ?>
</div>
<div class="main">
<?php 
switch (${"action"}) {
	case "raidadd":
		if (!($lvlGBook==0 || $lvlGBook!=3)) {

AddGuestBook();
		} 

		break;
	case "planadd":
		if ($lvlGBook>0 && $lvlGBook<3) {

AddGuestBook();
		} 

		break;
	default:

		header("Location: ".$URL);
		break;
} 

?>
			</div>
<?php require "footer.php"; ?>
</body>
</html>
<?php 
function AddGuestBook() {
	extract($GLOBALS);

	if (${"gb_author"}!="" && ${"gb_text"}!="") {

		$sql="select * from gbook where (id is null)";
		$result = mysql_query($sql);$sql    $conn
		$result->addnew;
		$result["gbook_poster"]=${"gb_author"};
		$result["gbook_content"]=${"gb_text"};
		$result["gbook_time"]=time();
		$result["gbook_raidid"]=${"gbook_id"};
		$result->update;
	} 

	header("Location: ".$URL);
	return $function_ret;
} 
?>


